x86: disable CR0.WP while applying alternatives
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 25 Feb 2016 12:06:16 +0000 (13:06 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 25 Feb 2016 12:06:16 +0000 (13:06 +0100)
commit36c672b559d35e088b181c67538b1ed5bacb0da5
tree73c06203a11a4538c5029cdd29a0adc11ed7a4fb
parenta3d7fa00d16831b60ec83e51a8f55e7e6b55781f
x86: disable CR0.WP while applying alternatives

In preparation for marking .text as read-only, care needs to be taken not to
fault while applying alternatives.

Swapping back to RW mappings is a possibility, but would require additional
TLB management.  A temporary disabling of CR0.WP is cleaner.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/alternative.c